<header class="subhead" id="overview">
  <div class="container">
    <center><%=image_tag("http://maamoon.com/images/logo.jpg")%></center>
  </div>
</header>
<div class="span3 bs-docs-sidebar">
<ul class="nav nav-list well bs-docs-sidenav affix">
<li class="active About Us"><a href="/about">About Us</a></li>
<li class="active Departments"><a href="/departments/all">Departments</a></li>
<%if !@departments.nil?%>
	<% @departments.each do |nf| %>
		<%@department = nf%>	
		<% name = @department.title %>
		<%if @department.id.to_s == @id.to_s %>
		<% %>
			<li><%= name %></li>
		<% else %>
			<li>
			<%=  link_to (name), {:action => 'get_categories_names', :controller => 'departments' , :id => @department.id } %>
			</li>
		<% end %>
	<% end %>
<% end %>
<li class="active Suppliers"><a href="/suppliers/all">Suppliers</a></li>
<li class="active Inquiries"><a href="/inquiries">Inquiries</a></li>
<li class="active Contact Us"><a href="/contact">Contact Us</a></li>
</ul>
</div>		
<div class="span9 offset2">
	<h2 class = "logs-take-input" >
 	<%='Category Index' %></h2>
	<ul class="nav nav-list" >
	 	<li class="divider"></li>
	</ul>
	<%if !@depart.categories.empty? %>
		<% @depart.categories.each do |nf| %>
			<%@category = nf%>	
			<div>
				<% if @category.title.nil? %>
					<%= name = "No Name Available" %>
				<% else %>
					<% name = @category.title %>
				 	<li class="active">
				 	<%=  link_to (name), {:action => 'get_product_names', :controller => 'categories' , :id => @category.id } %>
				 	</li>
                <% end %>
            </div>
       	<% end %>
    <% else %>
    No categories added yet.
    <% end %>
</div>